package com.zzti.impl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

import com.zzti.Dao.LoginDao;
import com.zzti.Uitl.DBuitl;

public class LoginDaoimpl implements LoginDao{
	DBuitl jdbc=new DBuitl();
	Connection conn;
	PreparedStatement pst;
	ResultSet rs;
	@Override
	public boolean selectAll(String name) {
		boolean v=false;
		try {
			String sql="select * from user where username=?";
			 conn=DBuitl.getConnection();
       pst=conn.prepareStatement(sql);
      
       pst.setString(1,name);    
     //  pst.setString(2, password);
		rs=pst.executeQuery();
		if(rs.next()) {
			return true;
		}
		
		
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return false;
	}

}